//入口文件

//引入vue
import Vue from 'vue'
//1.1导入路由的包
import VueRouter from 'vue-router'
//1.2安装路由模块
Vue.use(VueRouter)


//导入vue-resource
import VueResource from 'vue-resource'
//安装　vue-resource
Vue.use(VueResource)
Vue.http.options.root = 'http://psp.sdbairui.com';


//导入mui样式
import './lib/css/mui.css'
//导入mui扩展样式
import './lib/css/icons.extra.css'

//按需导入　mint-ui的组件
import {Header,Swipe, SwipeItem} from 'mint-ui'
//导入mint-ui的css
import 'mint-ui/lib/style.css'
//注册一下
Vue.component(Header.name,Header)

Vue.component(Swipe.name, Swipe)
Vue.component(SwipeItem.name, SwipeItem)

//1.3导入自己的路由　router.js　路由模块
import router from './route.js'

import moment from 'moment'
Vue.filter('dateFormat',function(dataStr,pattern = "YYY-MM-DD HH:mm:ss"){
    return moment(dataStr).format(pattern)
})


import app from './app.vue'
var vm = new Vue({
    el:'#app',
    render:c=>c(app),
    router//1.4挂在路由对象　vm　实例上
})